<html>
<head>
    <title>详情</title>
</head>
<link rel="stylesheet" href="/static/layui/css/layui.css" />
<body>
<form class="layui-form"  action="" lay-filter="detail">
    <div class="layui-form-item">
        <label class="layui-form-label">房屋名称：</label>
        <div class="layui-input-inline layui-col-md4">
            <input type="text" name="h_area" id="h_area" required  lay-verify="required" placeholder="请输入房屋名称" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">后勤人员：</label>
        <div class="layui-input-inline layui-col-md4">
            <input type="text" name="loname" id="loname" required  lay-verify="required" placeholder="请输入后勤人员" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">备注：</label>
        <div class="layui-input-inline layui-col-md4">
            <textarea placeholder="请输入内容" name="reremark"   class="layui-textarea"></textarea>
        </div>
    </div>
    <div class="layui-inline">
        <label class="layui-form-label">修缮时间：</label>
        <div class="layui-input-inline">
            <input type="text" name="retime" id="retime" lay-verify="retime" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
</body>

<script src="/static/js/system.js"></script>
<script src="/static/js/jquery-3.3.1.js"></script>
<script src="/static/layui/layui.js"></script>
<script>
    $(function () {
        $("input").prop("disabled","disabled");
        $("textarea").prop("disabled","disabled");
    })
    layui.use(['form','layer'], function(){
        var form = layui.form;
        $.ajax({
            url:'/RecordServlet?action=findById',
            type:"post",
            dataType:"json",
            data:{"reid":getQueryString("reid")},
            success:function (da) {
                if (da.code == 200) {
                   // form.val("detail", da.data);
                    form.val("detail", { //formTest 即 class="layui-form" 所在元素属性 lay-filter="" 对应的值
                        "h_area": da.date.h_area+da.date.h_unitNumber+da.date.h_roomNo // "name": "value"
                        ,"loname": da.date.loname,
                        "reremark": da.date.reremark,
                        "retime": layui.util.toDateString(da.date.retime, 'yyyy-MM-dd')
                    });
                } else {
                    parent.layer.msg("详情查询失败！");
                }
            }
        });
    });

</script>
</html>